import service from '../utils/request'
import Api from "./serviceApi";

export function getGroup(){
    return service({
        url: Api.common.group.getGroup,
        method: 'get',
    })
}

export function getGroupAddMessage(){
    return service({
        url: Api.common.group.getGroupAddMessage,
        method: 'get',
    })
}

export function intoGroupService(data:any) {
    return service({
        url: Api.common.group.intoGroup,
        method: 'post',
        params: data
    })
}

export function addGroupUser(data:any){
    return service({
        url: Api.common.group.addGroupUser,
        method: 'post',
        headers:{
            "Content-Type":"application/json;charset-utf-8" //设置一下请求头
        },
        data
    })
}

export function createGroup(data:any){
    return service({
        url: Api.common.group.createGroup,
        method: 'post',
        params: data
    })
}

export function agree(data:any){
    return service({
        url: Api.common.group.agree,
        method: 'post',
        params: data
    })
}

export function refusal(data:any){
    return service({
        url: Api.common.group.refusal,
        method: 'post',
        params: data
    })
}

export function exitGroup(data:any){
    return service({
        url: Api.common.group.exitGroup,
        method: 'post',
        params: data
    })
}

export function getGroupMember(data:any){
    return service({
        url: Api.common.group.getGroupMember,
        method: 'get',
        params: data
    })
}

export function getGroupInfo(data:any){
    return service({
        url: Api.common.group.getGroupInfo,
        method: 'get',
        params: data
    })
}

export function updateGroup(data:any){
    return service({
        url: Api.common.group.updateGroup,
        method: 'post',
        params: data
    })
}

export function kickOut(data:any){
    return service({
        url: Api.common.group.kickOut,
        method: 'post',
        params: data
    })
}

